<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>生产工厂列表</title>
<body class="withvernav">
<div class="bodywrapper">
	{{include file='/public/leftmenu.tpl'}}
	<div class="centercontent">
		<div class="pageheader notab">
			<h1 class="pagetitle">生产工厂列表</h1>
			<span class="pagedesc"></span>
			<div class="menulist">
				<ul class="profile_summary">
					{{if $managers || in_array('266',$showpower)}}  <li {{if $status==""}} class="current"{{/if}}> <a href="/batchorder/addProduceFactory"><span>添加生产工厂</span></a></li>{{/if}}
				</ul>
			</div>
		</div>
		<!--pageheader-->
		<div id="contentwrapper" class="contentwrapper">
			<div id="basicform" class="subcontent">
				<!--搜索栏-->
				<div>
					<div style="clear: both"></div>
					<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
					<form class="stdform stdform2" method="get" id="search" action="/batchorder/produceFactoryList">
						<div class="tableoptions">
							所属工厂：
							<select class="selectCss2 select2_group" name="search_factorys" id="search_factorys" style="width:100px;">
								<option value="">请选择</option>
								{{foreach from=$factorys item=res key=key}}
								<option value="{{$res.id}}" {{if $search_factorys eq {{$res.id}}}}selected{{/if}}> {{$res.name}} </option>
								{{/foreach}}
							</select>
							生产工厂：
							<select class="selection select2_group" name="produce_factorys" id="produce_factorys">
								<option value="">请选择</option>
								{{foreach from=$produce_factorys item=res key=key}}
								<option value="{{$res.id}}" {{if $producefactorys eq {{$res.id}}}}selected{{/if}}> {{$res.name}} </option>
								{{/foreach}}
							</select>
							&nbsp;&nbsp;&nbsp;
							<button class="btn btn_orange btn_search radius50">查询</button>
					</form>
				</div>
				<!--搜索栏结束-->
				<table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
					<thead>
					<tr class="lbbt">
						<td bgcolor="#FEFFF1" width="5%" ><a onClick="allSelect('ppid[]')">全选</a></td>
						<td  bgcolor="#FEFFF1" style="width:100px;">工厂名称</td>
						<td  bgcolor="#FEFFF1">工厂地址</td>
						<td  bgcolor="#FEFFF1" style="width:100px;">电话</td>
						<td  bgcolor="#FEFFF1">描述</td>
						<td  bgcolor="#FEFFF1" style="width:60px;">所属工厂</td>
						<td  bgcolor="#FEFFF1" style="width:50px;">操作者</td>
						<td  bgcolor="#FEFFF1" style="width:150px;">操作时间</td>
						<td  bgcolor="#FEFFF1" style="width:80px;">操作</td>
					</tr>
					</thead>
					<tbody >

					{{foreach from=$factorylist item=li key=key}}
					<tr>
						<td ><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.id}}" /></td>
						<td valign="middle">{{$li.name}}</td>
						<td valign="middle" >{{$li.address}}</td>
						<td valign="middle" >{{$li.phone}}</td>
						<td valign="middle" >{{$li.descr}}</td>
						<td valign="middle" >
							{{if $li.factoryProperty eq 1}}
								工厂1
							{{elseif $li.factoryProperty eq 2}}
							   工厂2
							{{/if}}
						</td>
						<td valign="middle" >{{$li.username}}</td>
						<td  style="position:relative;">{{$li.createtime}}</td>
						<td valign="middle" >
							<a href="/batchorder/addProduceFactory?id={{$li.id}}">编辑</a>
							｜
							<a onClick="return confirm('确认删除该生产工厂？')" href="/batchorder/ajaxbutton?op=delProduceFactory&id={{$li.id}}">删除</a>
						</td>
					</tr>
					{{/foreach}}
					</tbody>

				</table>
				<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
			</div>
		</div>



</body>
</html>